package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"qiyu-contact/internal/model/entity"
)

type RegisterReq struct {
	g.Meta        `mime:"application/json;charset=utf8" path:"/user/register" method:"post" summary:"用户注册" tags:"用户注册"`
	NickName      string `p:"nickName" v:"required|length:1,16#请输入您的昵称|昵称长度应该在1-16个字符" dc:"用户昵称" example:"奇遇"`
	Password      string `p:"password" v:"required#请输入密码" dc:"用户密码" example:"123456"`
	AgainPassword string `p:"againPassword" v:"required|same:password#请输入密码|两次输入的密码不一致" dc:"再次输入密码" example:"123456"`
}
type RegisterRes struct {
	g.Meta `mime:"application/json;charset=utf8"`
	Uuid   string `json:"uuid" dc:"用户UUID" example:"131-12321-32131-321"`
}
type LoginReq struct {
	g.Meta   `mime:"application/json;charset=utf8" path:"/user/login" tags:"login" method:"post" summary:"用户登录" tags:"用户登录"`
	Account  string `p:"account" v:"required#用户名不能为空" dc:"用户账号"`
	Password string `p:"password" v:"required#密码不能为空" dc:"用户密码"`
}
type LoginRes struct {
	g.Meta `mime:"application/json;charset=utf8"`
	Token  string              `json:"token" example:"token"`
	User   *entity.WebChatUser `json:"user"`
}
type UserDetailRes struct {
	g.Meta `mime:"application/json;charset=utf8"`
	User   *entity.WebChatUser `json:"user"`
}
type FindUserAccountReq struct {
	g.Meta `mime:"application/json;charset=utf8" path:"/user/findUserAccount" tags:"findUserAccount" method:"post" summary:"通过UID获取用户账号" tags:"通过UID获取用户账号"`
	Uuid   string `p:"uuid" v:"required#获取数据失败"`
}
type FindUserAccountRes struct {
	g.Meta  `mime:"application/json;charset=utf8"`
	Account string `json:"account"`
}
type GetUserFriendReq struct {
	g.Meta `mime:"application/json;charset=utf8" path:"/user/getUserFriend" tags:"getUserFriend" method:"post" summary:"查询用户好友" tags:"查询用户好友"`
}
type GetUserFriendRes struct {
	g.Meta `mime:"application/json;charset=utf8"`
	List   []*entity.WebChatFriendUnion `json:"list"`
}
type GetUserDetailReq struct {
	g.Meta `mime:"application/json;charset=utf8" path:"/user/getUserDetail" tags:"getUserDetail" method:"post" sm:"获取用户详情" tags:"查询用户详情"`
}
type GetUserDetailRes struct {
	g.Meta `mime:"application/json;charset=utf8"`
	*entity.WebChatUser
}
